<?php

function smarty_modifier_charsetutf8($string, $length = 80, $etc = '...',
                                  $break_words = false, $middle = false)
{
    // return mb_substr($string, 0,$length,'utf8');

    if ($length == 0)
        return '';

    if (strlen($string) > $length*3) {
      return mb_substr($string, 0,$length,'utf8'). $etc;
        }else{
       return mb_substr($string, 0,$length,'utf8');
    }
}

/* vim: set expandtab: */

?>
